package com.zuowei.ycy.user.http;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2016/5/3.
 */
public interface Address {
    String module = "Address";

    @FormUrlEncoded
    @POST(module+"/addAddress")
    Call<ResponseBody> addAddress(@Field("m_id") String m_id, @Field("consignee") String consignee, @Field("mobile") String mobile, @Field("address") String address, @Field("is_default") String is_default);

    @FormUrlEncoded
    @POST(module+"/modifyAddress")
    Call<ResponseBody> modifyAddress(@Field("address_id") String address_id, @Field("m_id") String m_id, @Field("consignee") String consignee, @Field("mobile") String mobile, @Field("address") String address, @Field("is_default") String is_default);

    @FormUrlEncoded
    @POST(module+"/addressList")
    Call<ResponseBody> addressList(@Field("m_id") String m_id);


    @FormUrlEncoded
    @POST(module+"/deleteAddress")
    Call<ResponseBody> deleteAddress(@Field("address_id") String address_id);


    /**
     * 获取默认地址
     * @param m_id
     * @return
     */
    @FormUrlEncoded
    @POST(module+"/getOneAddress")
    Call<ResponseBody> getOneAddress(@Field("m_id") String m_id);

}
